//package com.zmn.plat.admin.api.company;
//
//import com.alibaba.dubbo.config.annotation.Reference;
//import com.zmn.common.dto.VtDTO;
//import com.zmn.common.dto2.ResponseDTO;
//import com.zmn.common.utils.string.StringUtil;
//import com.zmn.plat.admin.controller.PlatBaseController;
//import com.zmn.plat.common.dto.company.BaseCompanyDIO;
//import com.zmn.plat.dubbo.interfaces.company.BaseCompanyListRemoteService;
//import com.zmn.plat.dubbo.utils.DubboConsts;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.ResponseBody;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.util.List;
//
///**
// * 公司/服务商查询API
// *
// * @uthor heguanghua
// * @since 2019/10/16 16:35
// */
//@Controller
//@RequestMapping("/api/company/")
//public class ApiCompanyListController extends PlatBaseController {
//
//
//    @Reference(version = DubboConsts.INTERFACE_VERSION, check = false)
//    private BaseCompanyListRemoteService companyRemoteService;
//
//    /**
//     * 搜索服务商
//     */
//    @RequestMapping(value = "search")
//    @ResponseBody
//    public ResponseDTO<List<VtDTO>> search(HttpServletRequest request, HttpServletResponse response, @RequestParam(value = "plat", required = false) Integer plat,
//        @RequestParam(value = "orgTwoId", required = false) Integer orgTwoId, @RequestParam(value = "orgThrId", required = false) Integer orgThrId,
//        @RequestParam(value = "type", required = false) Integer type, @RequestParam(value = "childType", required = false) Integer childType,
//        @RequestParam(value = "status", required = false) Integer status, @RequestParam(value = "keyword", defaultValue = "") String keyword) {
//
//        if (StringUtil.isBlank(keyword)) {
//            return ResponseDTO.fail("请输入查询关键词");
//        }
//
//        return this.listManageCompanyVtByQuery(plat, orgTwoId, orgThrId, type, childType, status, keyword);
//    }
//
//    // region 搜索服务商
//
//    /**
//     * 搜索服务商
//     *
//     * @param plat
//     *            平台标识，1言而有信，2啄木鸟，3一步维修，4川南环保，Null不限
//     * @param orgTwoId
//     *            大区的组织架构Id，Null不限
//     * @param orgThrId
//     *            子公司Id，Null不限
//     * @param type
//     *            服务商类型，1服务商，7信息公司，Null服务商或信息公司
//     * @param status
//     *            服务商状态，1禁用，2启用，Null不限
//     * @param keyword
//     *            服务商名称，支持中文及拼音模糊搜索，Null不限
//     * @return 服务商公司Id、公司名称和状态字段列表
//     */
//    private ResponseDTO<List<VtDTO>> listManageCompanyVtByQuery(Integer plat, Integer orgTwoId, Integer orgThrId, Integer type, Integer childType, Integer status) {
//        return listManageCompanyVtByQuery(plat, orgTwoId, orgThrId, type, childType, status, null);
//    }
//
//    private ResponseDTO<List<VtDTO>> listManageCompanyVtByQuery(Integer plat, Integer orgTwoId, Integer orgThrId, Integer type, Integer childType, Integer status, String keyword) {
//        BaseCompanyDIO baseCompanyDIO = new BaseCompanyDIO();
//        baseCompanyDIO.setPlat(plat);
//        baseCompanyDIO.setOrgTwoId(orgTwoId);
//        baseCompanyDIO.setOrgThrId(orgThrId);
//        baseCompanyDIO.setType(type);
//        baseCompanyDIO.setChildType(childType);
//        baseCompanyDIO.setStatus(status);
//        baseCompanyDIO.setName(keyword);
//        return companyRemoteService.listVtPageByQueryAndLimitPermit(baseCompanyDIO, false);
//    }
//    // endregion
//}
